package com.windward.vii.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@EnableConfigurationProperties
@ConfigurationProperties(prefix="tupu")
@ConditionalOnExpression("${tupu.enable:false}")
@Component
public class TupuConfig {

    private String secretId;
    private String privateKeyPath;
    private String taskId;

    public String getSecretId() {
        return secretId;
    }

    public void setSecretId(String secretId) {
        this.secretId = secretId;
    }

    public String getPrivateKeyPath() {
        return privateKeyPath;
    }

    public void setPrivateKeyPath(String privateKeyPath) {
        this.privateKeyPath = privateKeyPath;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @Override
    public String toString() {
        return "TupuConfig{" +
                "secretId='" + secretId + '\'' +
                ", privateKeyPath='" + privateKeyPath + '\'' +
                ", taskId='" + taskId + '\'' +
                '}';
    }
}
